package com.作业.第八章作业.HomeWork10;

public class main {
    public static void main(String[] args) {
        Doctor d1 = new Doctor("张三", 26, "医生", "男", 5000);
        Doctor d2 = new Doctor("张三", 26, "医生", "男", 5000);
        Doctor d3 = d1;
        System.out.println(d1.equals(d2));
        System.out.println(d1.equals(d3));
        System.out.println(d2.equals(d3));
        System.out.println("===============================================");
        Doctor d4 = new Doctor("jeck", 26, "医生", "男", 5000);
        Doctor d5 = new Doctor("jeck", 26, "医生", "男", 5000);
        System.out.println(d4.equals(d5));//  true
        System.out.println(d4.equals(d3));//  false
        System.out.println(d5.equals(d3));//  false
        System.out.println("===============================================");
        String str = new String("hello");
        System.out.println(d1.equals(str));


    }
}
